#include "mainwin.h"
#include "ui_mainwin.h"
#include "QDebug"
#include "QTime"

#include "userinfodetail.h"

MainWin::MainWin(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWin)
{
    ui->setupUi(this);

}

MainWin::~MainWin()
{
    delete ui;
}

void MainWin::init()
{
    InitConnect();
}

void MainWin::InitConnect()
{
    connect(ui->actionAdd_New_User, SIGNAL(clicked()), this, SLOT(addNewUserInfo()));
}

void MainWin::addNewUserInfo()
{
    UserInfoDetail* pUserInfoWidget = new UserInfoDetail;
    pUserInfoWidget->show();
    qDebug() << "is addNewUserInfo";
}

void MainWin::mousePressEvent(QMouseEvent* event)
{
    qDebug() << QString("%1 : class [%2] Receive Mouse Press Event!!").arg(QTime::currentTime().toString()).arg(this->metaObject()->className());
}

void MainWin::mouseReleaseEvent(QMouseEvent* event)
{
	qDebug() << QString("%1 : class [%2] Receive Mouse Release Event!!").arg(QTime::currentTime().toString()).arg(this->metaObject()->className());
}

